import HttpUtil from '@/common/HttpUtil'

const oilteaSurvey = {
  findOilteaSurvey(param) {
    let postUrl = process.env.SURVEY_DOMAIN + '/gr/oilteaSurvey/findPage'
    return HttpUtil.postJSON(postUrl, param)
  },
  getOilteaSurvey(id) {
    let postUrl = process.env.SURVEY_DOMAIN + '/gr/oilteaSurvey/getInfo/' + id
    return HttpUtil.get(postUrl, null)
  },
  // 删除附件
  deleteFile (param) {
    let postUrl = process.env.SURVEY_DOMAIN + '/gr/oilteaSurvey/deleteFile'
    return HttpUtil.postJSON(postUrl, param)
  },
  // 根据id获取单个数据
  getInfo (id) {
    let postUrl = process.env.SURVEY_DOMAIN + '/gr/oilteaSurvey/getInfo/' + id
    return HttpUtil.get(postUrl, null)
  },
  // 上传附件
  uploadFile (param) {
    let postUrl = process.env.SURVEY_DOMAIN + '/gr/oilteaSurvey/uploadFile'
    return HttpUtil.postFile(postUrl, param)
  },
  // 修改样地
  update (param) {
    let postUrl = process.env.SURVEY_DOMAIN + '/gr/oilteaSurvey/update'
    return HttpUtil.postJSON(postUrl, param)
  }
}
export default oilteaSurvey
